package com.cyl.wms.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 物料
 * @TableName erp_material
 */
@TableName(value ="erp_material")
@Data
public class Material implements Serializable {
    /**
     * 物料id
     */
    @TableId(type = IdType.AUTO)
    private Long materialId;

    /**
     * 物料编号
     */
    private String materialNumber;

    /**
     * 规格
     */
    private String specifications;

    /**
     * 物料名称
     */
    private String materialName;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 物料类型id
     */
    private Long materialTypeId;

    /**
     * 产地
     */
    private String producer;

    /**
     * 计量单位id
     */
    private Long unitMeasurementId;

    /**
     * 供应商id
     */
    private Long supplierId;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 用户单价
     */
    private Long unitPrice;

    /**
     * 条码
     */
    private String barCode;

    /**
     * 销售单价
     */
    private Long salesPrice;

    /**
     * 最低库存
     */
    private Integer minStock;

    /**
     * 采购周期
     */
    private Integer procurementCycle;

    /**
     * 重量
     */
    private Long weight;

    /**
     * 颜色
     */
    private String color;

    /**
     * 货位
     */
    private String goodsAllocation;

    /**
     * 用途
     */
    private String useTo;

    /**
     * 图号
     */
    private Integer figureNumber;

    /**
     * 来源id
     */
    private Long sourceId;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 显示顺序
     */
    private Integer orderNum;

    /**
     * 启用唯一码（0正常 1停用）
     */
    private String uniqueCodeStatus;

    /**
     * 采购强制检验状态（0正常 1停用）
     */
    private String inspectStatus;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 创建者
     */
    private Long createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新者
     */
    private Long updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Material other = (Material) that;
        return (this.getMaterialId() == null ? other.getMaterialId() == null : this.getMaterialId().equals(other.getMaterialId()))
            && (this.getMaterialNumber() == null ? other.getMaterialNumber() == null : this.getMaterialNumber().equals(other.getMaterialNumber()))
            && (this.getSpecifications() == null ? other.getSpecifications() == null : this.getSpecifications().equals(other.getSpecifications()))
            && (this.getMaterialName() == null ? other.getMaterialName() == null : this.getMaterialName().equals(other.getMaterialName()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getMaterialTypeId() == null ? other.getMaterialTypeId() == null : this.getMaterialTypeId().equals(other.getMaterialTypeId()))
            && (this.getProducer() == null ? other.getProducer() == null : this.getProducer().equals(other.getProducer()))
            && (this.getUnitMeasurementId() == null ? other.getUnitMeasurementId() == null : this.getUnitMeasurementId().equals(other.getUnitMeasurementId()))
            && (this.getSupplierId() == null ? other.getSupplierId() == null : this.getSupplierId().equals(other.getSupplierId()))
            && (this.getSupplierName() == null ? other.getSupplierName() == null : this.getSupplierName().equals(other.getSupplierName()))
            && (this.getUnitPrice() == null ? other.getUnitPrice() == null : this.getUnitPrice().equals(other.getUnitPrice()))
            && (this.getBarCode() == null ? other.getBarCode() == null : this.getBarCode().equals(other.getBarCode()))
            && (this.getSalesPrice() == null ? other.getSalesPrice() == null : this.getSalesPrice().equals(other.getSalesPrice()))
            && (this.getMinStock() == null ? other.getMinStock() == null : this.getMinStock().equals(other.getMinStock()))
            && (this.getProcurementCycle() == null ? other.getProcurementCycle() == null : this.getProcurementCycle().equals(other.getProcurementCycle()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()))
            && (this.getGoodsAllocation() == null ? other.getGoodsAllocation() == null : this.getGoodsAllocation().equals(other.getGoodsAllocation()))
            && (this.getUseTo() == null ? other.getUseTo() == null : this.getUseTo().equals(other.getUseTo()))
            && (this.getFigureNumber() == null ? other.getFigureNumber() == null : this.getFigureNumber().equals(other.getFigureNumber()))
            && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum()))
            && (this.getUniqueCodeStatus() == null ? other.getUniqueCodeStatus() == null : this.getUniqueCodeStatus().equals(other.getUniqueCodeStatus()))
            && (this.getInspectStatus() == null ? other.getInspectStatus() == null : this.getInspectStatus().equals(other.getInspectStatus()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMaterialId() == null) ? 0 : getMaterialId().hashCode());
        result = prime * result + ((getMaterialNumber() == null) ? 0 : getMaterialNumber().hashCode());
        result = prime * result + ((getSpecifications() == null) ? 0 : getSpecifications().hashCode());
        result = prime * result + ((getMaterialName() == null) ? 0 : getMaterialName().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getMaterialTypeId() == null) ? 0 : getMaterialTypeId().hashCode());
        result = prime * result + ((getProducer() == null) ? 0 : getProducer().hashCode());
        result = prime * result + ((getUnitMeasurementId() == null) ? 0 : getUnitMeasurementId().hashCode());
        result = prime * result + ((getSupplierId() == null) ? 0 : getSupplierId().hashCode());
        result = prime * result + ((getSupplierName() == null) ? 0 : getSupplierName().hashCode());
        result = prime * result + ((getUnitPrice() == null) ? 0 : getUnitPrice().hashCode());
        result = prime * result + ((getBarCode() == null) ? 0 : getBarCode().hashCode());
        result = prime * result + ((getSalesPrice() == null) ? 0 : getSalesPrice().hashCode());
        result = prime * result + ((getMinStock() == null) ? 0 : getMinStock().hashCode());
        result = prime * result + ((getProcurementCycle() == null) ? 0 : getProcurementCycle().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
        result = prime * result + ((getGoodsAllocation() == null) ? 0 : getGoodsAllocation().hashCode());
        result = prime * result + ((getUseTo() == null) ? 0 : getUseTo().hashCode());
        result = prime * result + ((getFigureNumber() == null) ? 0 : getFigureNumber().hashCode());
        result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode());
        result = prime * result + ((getUniqueCodeStatus() == null) ? 0 : getUniqueCodeStatus().hashCode());
        result = prime * result + ((getInspectStatus() == null) ? 0 : getInspectStatus().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", materialId=").append(materialId);
        sb.append(", materialNumber=").append(materialNumber);
        sb.append(", specifications=").append(specifications);
        sb.append(", materialName=").append(materialName);
        sb.append(", brand=").append(brand);
        sb.append(", materialTypeId=").append(materialTypeId);
        sb.append(", producer=").append(producer);
        sb.append(", unitMeasurementId=").append(unitMeasurementId);
        sb.append(", supplierId=").append(supplierId);
        sb.append(", supplierName=").append(supplierName);
        sb.append(", unitPrice=").append(unitPrice);
        sb.append(", barCode=").append(barCode);
        sb.append(", salesPrice=").append(salesPrice);
        sb.append(", minStock=").append(minStock);
        sb.append(", procurementCycle=").append(procurementCycle);
        sb.append(", weight=").append(weight);
        sb.append(", color=").append(color);
        sb.append(", goodsAllocation=").append(goodsAllocation);
        sb.append(", useTo=").append(useTo);
        sb.append(", figureNumber=").append(figureNumber);
        sb.append(", sourceId=").append(sourceId);
        sb.append(", remarks=").append(remarks);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", uniqueCodeStatus=").append(uniqueCodeStatus);
        sb.append(", inspectStatus=").append(inspectStatus);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}